package com.googlecode.imanager.client.value.el;

import com.googlecode.imanager.client.value.ValueType;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public abstract class CoupleOperation extends Expression {

    private static final long serialVersionUID = 1L;
    
    protected Expression leftExpression;
    protected Expression rightExpression;
    
    public CoupleOperation(Expression leftExpression, Expression rightExpression) {
        setLeftExpression(leftExpression);
        setRightExpression(rightExpression);
    }
    
    public Expression getLeftExpression(){
        return leftExpression;
    }

    public Expression getRightExpression(){
        return rightExpression;
    }

    public void setLeftExpression(Expression leftExpression) {
        this.leftExpression = leftExpression;
    }

    public void setRightExpression(Expression rightExpression) {
        this.rightExpression = rightExpression;
    }

    @Override
    public ValueType getValueType() {
        return ValueType.DECIMAL;
    }

    @Override
    public Expression[] getSubExpressions() {
        return new Expression[]{leftExpression, rightExpression};
    }

}
